<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	
</body>
	<script>
		// 创建数组
		// 1、通过new来创建
		var arry = new Array(123,"佳译老师",true);
		console.log(arry);
		// 2、通过数组字面量来创建
		var arry2 = [123,'佳译老师','王老板','章鱼哥'];
		console.log(arry2);
		// 数组的下标从零开始
		// 获取到arry2 里的王老板
		console.log(arry2[1]);
		console.log(arry2[2]);
		console.log(arry2[3]);
		// console.log(arry2[4]);   //undefined
		for(var i = 0;i < arry2.length; i++ ){
			console.log(arry2[i]);
		}
		console.log(arry2.length);
	</script>
</html>